#ifndef HTON_H
#define HTON_H

#define CL		0
#define	SV		1

/**
 **	Converts a packet, represented by a struct contained in CLSV_BUFFER and
 ** determined by the opcode to a stream from host to network byte order.
 **
 ** @param	p		Pointer to the CLSV_BUFFER struct.
 ** @param	stream	Pointer to void * where the stream will be left. Memory is
 **					allocated in the function, must be freed elsewhere.
 ** @param	opcode	Opcode of the packet.
 ** @param	src		Client (CL) or server (SV).
 ** @return			Returns the size in bytes of the stream.
 **
 **/
int hton_clsv_buffer(CLSV_BUFFER * p, void ** stream, OPC opcode, int src);

#endif
